Read me for Election Night repository 

This readme contains information on the process and fields necessary to consume and output the figures as part of the MEDSL report, "THE BLUE SHIFT IN THE 2020 ELECTION."  


Files: 

replication: The replication .do files used to create the respective figures in the report. The number following "fig" denotes the figures created. 

fig1.do - The do file used to create Figures 1a and 1b

...

figs19-21.do - The do file used to create Figures 19 - 21


	data:
	
	nyt_states.csv - A data frame of the New York Times state level data of the 			election results as reported from the National Election Pool. Includes the 		following fields. 

	time (str) - The %Y-%m-%d %H:%M:S formatted character data of when an update was 		made to a given state's election results. Time zone is EST/EDT.

	state (str) - The lower case state name. 

	rep (long) - The cumulative votes for the Republican presidential ticket. 

	dem (long) - The cumulative votes for the Democratic presidential ticket.

	total (long) - The cumulative total votes for presidential race. 

	percentreported (str) - The NYT ticker of the percent of the vote reported at a 		given time. 

	pollsclose (str) - The %Y-%m-%d %H:%M:S formatted character data of when polls 		closed for a state.

	repdiff (long) - The new votes/difference in the Republican ticket vote share since 	the previous reported time stamp. 

	demdiff (long) - The new votes/difference in the Democratic ticket vote share since 	the previous reported time stamp.

	totaldiff (long) - The new votes/difference in the total vote share since the 		previous reported time stamp.

	state_cumulative (float) - The cumulative proportion of the total vote reported at 		a given point in time. Ranges from 0 - 1.

	hoursfromclose (float) - The hours from when the polls closed. 

	hoursfromclose_rounded (float) - The hours from when the polls closed, rounded.

	maxtotal (float) - The maximum/final vote tally overall. 

	maxdem (float) - The maximum/final vote tally for the Democratic ticket.

	maxrep (float) - The maximum/final vote tally for the Republican ticket.

	dempct (float) - The Democratic percent of the 2-party voteshare

	
	nyt_counties.csv - A data frame of the New York Times county level data of the 			election results as reported from the National Election Pool. Includes the 			following fields. 
	
	fips (long): The five digit FIPS code, with the state fips ranging from 1 - 56, and 	following three digits the county FIPS signifier.

	votes (double): The total cumulative votes for president. 

	absentee votes (long): The total cumulative absentee votes as calculated by the 		NYT/NEP; not necessarily reliable. 

	reporting (int): The number of precincts reporting. 

	precincts (int): The total number of precincts within a county. 

	absentee_method (str): A text field with notes on the absentee method. 

	*eevp: The estimated expected vote as calculated by the NYT/NEP; not necessarily 	reliable. 

	tot_exp_vote (str): The total expected vote as calculated by the NYT/NEP; not 	necessarily reliable. 

	*eevp_value (str): The string ticker of the expected vote reported as calculated by 	the NYT/NEP; not necessarily reliable. 

	*eevp_value (str): The string ticker of the expected vote reported as calculated by 		the NYT/NEP with reported pasted; not necessarily reliable.

	*eevp_source (str): The source of the information on calculating the eevp.

	absentee_count_progress (str): A text indicator of the absentee ballots reported so 	far; options are "all", "none", "some", "unknown". 


	absentee_max_ballots (str): The final count of absentee ballots for a given county. 
	

	leader_margin_value (str): the percentage point margin lead for the leading 	candidate.


	leader_party_id (str): the party name (lowercase) of the leading party. 

	margin2020 (str): The margin of the leading candidate. 

	state (str): The title case state name.

	time (str): The %Y-%m-%d %H:%M:S formatted character data of when an update was 		made to a given state's election results. Time zone is EST/EDT.

	totalvotes (long): The cumulative total votes for presidential race. 

	percentreported (str): The NYT ticker of the percent of the vote reported at a 		given time. 

	trumpd (long): the total cumulative votes for Trump at a given time. 

	bidenj (long): the total cumulative votes for Biden at a given time. 

	jorgensenj (long): the total cumulative votes for Jorgensen (libertarian) at a 	given time.  

	abs_trumpd (long): the total cumulative absentee ballots for Trump at a given time. 

	abs_bidenj (long): the total cumulative absentee ballots for Biden at a given time.

	abs_jorgensenj (long): the total cumulative absentee ballots for Jorgensen 	(libertarian) at a given time.

	time_num (float): the numeric converted time. 

	hours_from_close (float): The hours from polls closing. 

	final_votes (float): The final number of votes for a given county. 

	pct_reported (float): The percent of the vote reported at a given time. 

	max_bidenj (float): The final vote cast for Biden in a given county. 

	max_trumpd (float): The final vote cast for Trump in a given county.

	biden_win (float): A dichotomous variable indicating if Biden won a county in the 	end, 1 if yes, 0 otherwise.  

pollsclose.csv - a dataframe by state of the times when polls closed for the election. 

certification_date.dta - a dataframe of when a state certifies the presidential election results. 

GA_precincts.csv - a dataframe of the Georgia election night returns data from Scytl, by precinct. 

scratch (folder) - a repository of intermeidary files used for some of the figures. 

Output

data/figures - a folder of all the figures, as produced from the do files. 





 

 

	

	
 	




